home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
AppleEvents
/
AEDescriptor.h
< prev
next >
Wrap
Text File
|
2000-06-23
|
2KB
|
65 lines
// AEDescriptor.h
#ifndef AEDescriptor_h
#define AEDescriptor_h
#ifndef AEType_h
#include "AEType.h"
#endif
#ifndef MasterPointer_h
#include "MasterPointer.h"
#endif
class ConstAEListItem;
class ConstAEMember;
class ConstAEParameter;
class ConstAEAttribute;
class AEList;
class AEStruct;
class AEEvent;
class AEDescriptor: public AEDesc
{
private:
// not implemented:
void operator=( const AEDescriptor& );
public:
AEDescriptor();
explicit AEDescriptor( const AEDescriptor& );
AEDescriptor( ConstData data, AEType type );
AEDescriptor( const AEDescriptor&, AEType type );
explicit AEDescriptor( const ConstAEListItem&, AEType type = AEType::Any() ); // In ConstAEListItem.cp
explicit AEDescriptor( const ConstAEMember&, AEType type = AEType::Any() ); // In ConstAEMember.cp
explicit AEDescriptor( const ConstAEParameter&, AEType type = AEType::Any() ); // In ConstAEParameter.cp
explicit AEDescriptor( const ConstAEAttribute&, AEType type = AEType::Any() ); // In ConstAEAttribute.cp
~AEDescriptor();
AEList& AsList() { return *reinterpret_cast<AEList*>(this); }
const AEList& AsList() const { return *reinterpret_cast<const AEList*>(this); }
AEStruct& AsRecord() { return *reinterpret_cast<AEStruct*>(this); }
const AEStruct& AsRecord() const { return *reinterpret_cast<const AEStruct*>(this); }
AEEvent& AsEvent() { return *reinterpret_cast<AEEvent*>(this); }
const AEEvent& AsEvent() const { return *reinterpret_cast<const AEEvent*>(this); }
bool IsNull() const { return dataHandle == 0; }
bool Allocated() const { return dataHandle != 0; }
void Dispose();
void Swap( AEDescriptor& );
AEType Type() const
{ Assert( Allocated() ); return AEType( descriptorType ); }
const MasterPointer& Value() const
{ Assert( Allocated() ); return MasterPointer::At( dataHandle ); }
void Get( AEType, Data ) const;
};
#endif